const express = require('express')
const app = express()

//导入cors
const cors = require('cors')
//导入body-parser
var bodyParser = require('body-parser')
//全局挂载
app.use(cors())

// parse application/x-www-form-urlencoded
//当extend为false时，值为数组或字符串，当为true时，值可以为任意类型
app.use(bodyParser.urlencoded({
	extended: false
}))

// parse application/json
app.use(bodyParser.json())

app.listen(3007, () => {
	console.log('http://127.0.0.1:3007')
})